import request from '/@/utils/request';

export default{
	createJob(job: Object) {
		return request({
			url: '/schedule/createJob',
			method: 'post',
			data: job,
		});
	},
	updateJob(job: Object) {
		return request({
			url: '/schedule/updateJob',
			method: 'post',
			data: job,
		});
	},
	getAllJobs() {
		return request({
			url: '/schedule/getAllJobs',
			method: 'get',
			data: null,
		});
	},
	removeJob(jobId: number) {
		return request({
			url: `/schedule/removeJob/${jobId}`,
			method: 'post',
			data: null,
		});
	},
	startJob(jobId: number) {
		return request({
			url: `/schedule/startJob/${jobId}`,
			method: 'post',
			data: null,
		});
	},
	stopJob(jobId: number) {
		return request({
			url: `/schedule/stopJob/${jobId}`,
			method: 'post',
			data: null,
		});
	},

}
